1. Field of the Invention
The present invention relates to a PWM signal generation apparatus and a method thereof for generating a PWM signal and a motor control apparatus and a method thereof for controlling a motor using a PWM signal. More particularly, the present invention relates to a PWM signal generation apparatus and a method thereof for generating a PWM signal using a counter and a motor control apparatus and a method thereof using a PWM signal.
2. Description of Related Art
Generally PWM (Pulse Width Modulation) control method is used to control a motor. In the PWM control method, with a constant switching cycle (PWM output cycle), a voltage applied to a motor is controlled by changing on time of a switching circuit. That is, in the PWM control method, a rotation speed of a motor is controlled by changing a duty ratio of a pulse signal.
A digital three-phase waveform generation apparatus for performing this PWM control is disclosed in Japanese Unexamined Patent Application Publication No. 2004-301806. This apparatus includes an up/down counter that changes in a triangular waveform and a register. A pulse width is determined by comparing a counter value of the up/down counter and a register value of the register. In other words, a pulse width is determined by a timing that the register value equals to the counter value while counting up and a timing that the register value equals the counter value while counting down. A pulse width modulation is performed by changing the register value. In this apparatus, the three-phase motor can be controlled by an operation to rewrite three registers. Accordingly the number of devices can be kept to a minimum, reducing processing capacity of a Micro Controller Unit.
In a conventional PWM waveform generation apparatus, a pulse width is determined by comparing a up/down counter value that changes in a triangular waveform and the register value (see in FIG. 6A). That is, a pulse width is time between a timing that the counter value equals to the register value while counting up and a timing that the counter value equals to the register value while counting down.
Suppose that the count number of the up/down counter is M. The up/down counter repeatedly counts up and down from 0 to M and from M to 0. Suppose that a register for generating a PWM output waveform is N (where M>N). In case a cycle of a clock of a counter is 1, a pulse width of a PWM output signal is 2×(M−N). It means that a count value from the register value to the count number is (M−N) while counting up. On the other hand the count number from the count number M to the register value N is also (M−N) while counting down. Accordingly a pulse width of the PWM output signal is a sum of the count numbers, which is 2×(M−N).
The pulse width of PWM output signal is determined in accordance with an identity signal based on a comparison between the register value and the counter value. For example in case a pulse width is 100 when a compare value stored to a compare register is 50, if the compare value changes to 49, the pulse width becomes 102. In case the compare value becomes 51, the pulse width becomes 98. Accordingly 1 rise/fall of the compare value causes the pulse width to rise/fall by 2. In this example, dead time is not considered for the ease of explanation.
As described in the foregoing, the pulse width of the PWM output signal is twofold (m−n). Therefore in a conventional PWM control method, a pulse width can be changed only up to twofold time of a clock cycle of an up/down counter. It has now been discovered that in a conventional PWM waveform generation apparatus, the resolving power of the PWM output signal is only ½ of that of the compare value and ½ of that of the counter. In the conventional PWM waveform generation apparatus, a pulse width cannot be finely configured, thereby making it difficult to improve an accuracy of a motor control.